home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14004 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  49 lines

  1. Newsgroups: comp.lang.c
  2. Path: gail.ripco.com!mambuhl
  3. From: mambuhl@ripco.com (Martin Ambuhl)
  4. Subject: Re: Help:what is wrong th
  5. Message-ID: <Dpotxz.6nq@rci.ripco.com>
  6. X-Nntp-Sender: mambuhl@cook.ripco.com
  7. Sender: usenet@rci.ripco.com (Net News Admin)
  8. Organization: Ripco Internet BBS Chicago
  9. Date: Thu, 11 Apr 1996 07:53:59 GMT
  10.  
  11. prye@cyllene.uwa.edu.au (Peter Rye)
  12. in <PRYE.96Apr10231219@cyllene.uwa.edu.au> asks:
  13.  
  14. >But when I try this my compiler complains:
  15.  
  16. >ub239:~$ cat junk.c
  17. >#include <math.h>
  18. >#include <stdio.h>
  19.  
  20. >int main() {
  21. >  double x = 3.232;
  22. >  printf("%lf\n", sqrt(x));
  23. >  return 0;
  24. >}
  25. >ub239:~$ gcc -c -Wall -ansi -pedantic junk.c
  26. >junk.c: In function `main':
  27. >junk.c:6: warning: use of `l' length character with `f' type character
  28.  
  29. >Why ?  ;-)
  30. >--
  31.  
  32.  
  33. From ISO 7.9.6.1 The fprintf function
  34.  
  35.         "...an optional l (ell) specifying that a following d, i, o, u,
  36.         x, or X conversion specifier applies to a long int or unsigned
  37.         long int argument; an optional l specifying that a following n
  38.         conversion specifier applies to a pointer to a long int
  39.         argument; or an optional L specifying that a following e, E, f,
  40.         g, or G conversion specifier applies to a long double argument
  41.         ..."
  42.  
  43. Case counts in C.
  44.  
  45.                                                                                              
  46. --
  47. * Martin Ambuhl       net: mambuhl@ripco.com
  48. * Chicago, IL (USA)    
  49.